An accessory connected to a universal serial bus (USB) can be identified by detecting a value of an identification (ID) resistor of the accessory. A known current can be applied to the ID resistor and a resulting voltage can be compared to one or more thresholds using one or more comparators to determine the value of the ID resistor.